Vue.component('v-radio',{
    template:`
        <label :for='label' class='radio'>
            <input type='radio'  :id='label' @change='handleChange' :value="label" :checked='isChecked' class='radio_none'/>
            <span class='radio_input'></span><slot></slot>
        </label>
    `,
    props:{
        value:{
            type:[String,Number,Boolean]
        },
        label:{
            type:[String,Number,Boolean]
        },
    },
    data(){
        return {
            
        }
    },
    methods:{
        handleChange(){
            this.$emit('input',this.label)
        }
        
    },
    computed:{
       isChecked(){
           return this.value === this.label
       }
    }
})